<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            perspective: 800px;
            background-color: black;
        }

        .box {
            position: absolute;
            top: 200px;
            left: 200px;
            width: 150px;
            height: 150px;
            transform-style: preserve-3d;
            transform: rotateX(0deg) rotateY(45deg);
            /* animation: mykey 3s linear infinite; */

        }

        .box div {
            width: 100%;
            height: 100%;
            position: absolute;
            opacity: .8;
            transition: all 5s;

        }



        .box1 {
            background-image: url(./imgs/1.jpg);
            transform: rotateX(90deg) translateZ(75px);
        }

        .box7 {
            background-image: url(./imgs/1.jpg);
            transform: rotateX(90deg) translateZ(75px);
        }

        body:hover .box7 {
            transform: rotateX(450deg) translateZ(150px);
        }

        .box2 {
            background-image: url(./imgs/2.jpg);
            transform: rotateX(-90deg) translateZ(75px);
        }

        .box8 {
            background-image: url(./imgs/2.jpg);
            transform: rotateX(-90deg) translateZ(75px);
        }

        body:hover .box8 {
            transform: rotateX(-450deg) translateZ(150px);
        }

        .box3 {
            background-image: url(./imgs/3.jpg);
            transform: rotateY(-90deg) translateZ(75px);
        }

        .box9 {
            background-image: url(./imgs/3.jpg);
            transform: rotateY(-90deg) translateZ(75px);
        }

        body:hover .box9 {
            transform: rotateY(-405deg) translateZ(150px);
        }

        .box4 {
            background-image: url(./imgs/4.jpg);
            transform: rotateY(90deg) translateZ(75px);
        }

        .box10 {
            background-image: url(./imgs/4.jpg);
            transform: rotateY(90deg) translateZ(75px);
        }

        body:hover .box10 {
            transform: rotateY(495deg) translateZ(150px);
        }

        .box5 {
            background-image: url(./imgs/5.jpg);
            transform: rotateY(180deg) translateZ(75px);
        }

        .box11 {
            background-image: url(./imgs/5.jpg);
            transform: rotateY(180deg) translateZ(75px);
        }

        body:hover .box11 {
            transform: rotateY(585deg) translateZ(150px);
        }

        .box6 {
            background-image: url(./imgs/6.jpg);
            transform: rotateY(0deg) translateZ(75px);
        }

        .box12 {
            background-image: url(./imgs/6.jpg);
            transform: rotateY(0deg) translateZ(75px);
        }

        body:hover .box12 {
            transform: rotateY(405deg) translateZ(150px);
        }

        @keyframes mykey {
            0% {
                transform: rotateX(0deg) rotateY(0deg);
            }

            100% {
                transform: rotateX(360deg) rotateY(360deg);
            }
        }
    </style>
</head>

<body>

    <div class="box">
        <div class="box1"></div>
        <div class="box2"></div>
        <div class="box3"></div>
        <div class="box4"></div>
        <div class="box5"></div>
        <div class="box6"></div>


        <div class="box7"></div>
        <div class="box8"></div>
        <div class="box9"></div>
        <div class="box10"></div>
        <div class="box11"></div>
        <div class="box12"></div>
    </div>

</body>

</html>